Optimal. Leaf size=78 \[ -\frac{i x}{16}-\frac{i}{8 (-\tan (x)+i)}-\frac{3 i}{16 (\tan (x)+i)}-\frac{1}{32 (-\tan (x)+i)^2}-\frac{5}{32 (\tan (x)+i)^2}+\frac{i}{24 (\tan (x)+i)^3} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0659966, antiderivative size = 78, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 4, integrand size = 13, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.308, Rules used = {3516, 848, 88, 203} \[ -\frac{i x}{16}-\frac{i}{8 (-\tan (x)+i)}-\frac{3 i}{16 (\tan (x)+i)}-\frac{1}{32 (-\tan (x)+i)^2}-\frac{5}{32 (\tan (x)+i)^2}+\frac{i}{24 (\tan (x)+i)^3} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3516
Rule 848
Rule 88
Rule 203
Rubi steps
\begin{align*} \int \frac{\sin ^4(x)}{i+\tan (x)} \, dx &=\operatorname{Subst}\left (\int \frac{x^4}{(i+x) \left (1+x^2\right )^3} \, dx,x,\tan (x)\right )\\ &=\operatorname{Subst}\left (\int \frac{x^4}{(-i+x)^3 (i+x)^4} \, dx,x,\tan (x)\right )\\ &=\operatorname{Subst}\left (\int \left (\frac{1}{16 (-i+x)^3}-\frac{i}{8 (-i+x)^2}-\frac{i}{8 (i+x)^4}+\frac{5}{16 (i+x)^3}+\frac{3 i}{16 (i+x)^2}-\frac{i}{16 \left (1+x^2\right )}\right ) \, dx,x,\tan (x)\right )\\ &=-\frac{1}{32 (i-\tan (x))^2}-\frac{i}{8 (i-\tan (x))}+\frac{i}{24 (i+\tan (x))^3}-\frac{5}{32 (i+\tan (x))^2}-\frac{3 i}{16 (i+\tan (x))}-\frac{1}{16} i \operatorname{Subst}\left (\int \frac{1}{1+x^2} \, dx,x,\tan (x)\right )\\ &=-\frac{i x}{16}-\frac{1}{32 (i-\tan (x))^2}-\frac{i}{8 (i-\tan (x))}+\frac{i}{24 (i+\tan (x))^3}-\frac{5}{32 (i+\tan (x))^2}-\frac{3 i}{16 (i+\tan (x))}\\ \end{align*}
Mathematica [A] time = 0.0800587, size = 67, normalized size = 0.86 \[ \frac{\sec (x) \left (-32 \sin (x)-27 \sin (3 x)+5 \sin (5 x)-56 i \cos (x)-9 i \cos (3 x)+i \cos (5 x)+24 \tan ^{-1}(\tan (x)) (\cos (x)-i \sin (x))\right )}{384 (\tan (x)+i)} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.075, size = 66, normalized size = 0.9 \begin{align*}{\frac{{\frac{i}{8}}}{\tan \left ( x \right ) -i}}-{\frac{1}{32\, \left ( \tan \left ( x \right ) -i \right ) ^{2}}}-{\frac{\ln \left ( \tan \left ( x \right ) -i \right ) }{32}}+{\frac{{\frac{i}{24}}}{ \left ( i+\tan \left ( x \right ) \right ) ^{3}}}-{\frac{{\frac{3\,i}{16}}}{i+\tan \left ( x \right ) }}-{\frac{5}{32\, \left ( i+\tan \left ( x \right ) \right ) ^{2}}}+{\frac{\ln \left ( i+\tan \left ( x \right ) \right ) }{32}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: RuntimeError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 2.06533, size = 136, normalized size = 1.74 \begin{align*} \frac{1}{384} \,{\left (-24 i \, x e^{\left (4 i \, x\right )} - 2 \, e^{\left (10 i \, x\right )} + 9 \, e^{\left (8 i \, x\right )} - 12 \, e^{\left (6 i \, x\right )} - 18 \, e^{\left (2 i \, x\right )} + 3\right )} e^{\left (-4 i \, x\right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 0.395444, size = 51, normalized size = 0.65 \begin{align*} - \frac{i x}{16} - \frac{e^{6 i x}}{192} + \frac{3 e^{4 i x}}{128} - \frac{e^{2 i x}}{32} - \frac{3 e^{- 2 i x}}{64} + \frac{e^{- 4 i x}}{128} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.3062, size = 72, normalized size = 0.92 \begin{align*} -\frac{3 i \, \tan \left (x\right )^{4} + 21 \, \tan \left (x\right )^{3} + 13 i \, \tan \left (x\right )^{2} + 11 \, \tan \left (x\right ) + 8 i}{48 \,{\left (\tan \left (x\right ) + i\right )}^{3}{\left (\tan \left (x\right ) - i\right )}^{2}} + \frac{1}{32} \, \log \left (\tan \left (x\right ) + i\right ) - \frac{1}{32} \, \log \left (\tan \left (x\right ) - i\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]